While testing with PHPUnit i encountered a problem.
$movieModelMock = $this->getMockBuilder('MoCo\Models\Movie')->getMock();
$movieModelMock->method('find')->willReturn($this->returnValue(null));
$this->assertEquals(null, $movieModelMock->find());
This results in:
PHPUnit_Framework_MockObject_BadMethodCallException
MoCo\Models\Movie is a basic Phalcon model. Nothing fancy.
If someone wants to try to reproduce it: https://github.com/mrBulb/MoCo/tree/develop
To run the tests:
cd tests
../vendor/bin/phpunit
Anyone a idea?